<?php
/* @var $this SitesController */
/* @var $model Sites */
/* @var $form CActiveForm */
?>

<div class="grid-24">
  <div class="widget">
    <div class="widget-header">
      <span
        class="<?php if (sizeof($searchData) > 0) { ?>icon-minus-alt<?php } else { ?>icon-plus-alt<?php } ?>"
        id="search_icon" onclick="return commonFn.searchForm()"></span>
      <h3>
        <?php echo Yii::t('main', 'form.search'); ?>
      </h3>
    </div>
    <!-- .widget-header -->
    <div class="widget-content" style="<?php if (sizeof($searchData) == 0) { ?>display: none;<?php }; ?>" id="search_form">
      <?php
      $form = $this->beginWidget('CActiveForm', array(
          'action' => Yii::app()->createUrl($this->route),
          'method' => 'get',
          'htmlOptions' => array('class' => 'form uniformForm validateForm'),
      ));
      ?>

      <div class="field-group">
        <?php echo $form->label($model, 'sitename'); ?>
        <div class="field">
          <?php echo $form->textField($model, 'sitename', array('size' => 60, 'maxlength' => 256, 'value' => (isset($searchData['sitename'])) ? $searchData['sitename'] : '' )); ?>
        </div>
      </div>


      <div class="field-group">
        <?php echo $form->label($model, 'site_url'); ?>
        <div class="field">
          <?php echo $form->textField($model, 'site_url', array('size' => 60, 'maxlength' => 256, 'value' => (isset($searchData['site_url'])) ? $searchData['site_url'] : '')); ?>
        </div>
      </div>

      <div class="field-group">
        <?php echo $form->label($model, 'status'); ?>
        <div class="field">
          <?php echo $form->textField($model, 'status',array('size'=>60, 'value' => (isset($searchData['status'])) ? $searchData['status'] : '')); ?>
        </div>
      </div>

      <div class="field-groups">
        <button class="btn btn-primary btn-small" type="submit"><span class="icon-loop"></span>Tìm kiếm</button>
      </div>

      <?php $this->endWidget(); ?>
    </div>
  </div>
</div>
